package com.zz.extension.listener;

import com.zz.extension.constant.Constants;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class DelayListener {
    // 延迟队列
    @RabbitListener(queues = Constants.DELAY_QUEUE)
    public void delayListen(String msg) {
        System.out.println("接收到消息：" + msg + "，当前时间：" + new Date());
    }
}
